import time

from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from selenium import webdriver
driver = webdriver.Chrome()
driver.get('https://www.baidu.com')
# def cliike(x):
#     a=x.find_element(By.CSS_SELECTOR,'a[class="tag-link"]')
#     if a:
#         a.click()a[class="tag-link"]
#         return True
#     else:
#         return False
# WebDriverWait(driver,10,1).until(cliike,message='你干嘛')
# time.sleep(10)
kw = driver.find_element('id','kw')
print(type(kw.get_attribute('id')))
def page_control(self, controll='refresh'):
    if controll=='refresh':
        self.refresh()
page_control(driver)

